exports.onlineCount = function(query, resp, callback) {
    if (isNaN(query.sid)) {
        resp.code = 1; resp.desc = 'invalid params';
        callback(); return;
    }
    
    var sid = +query.sid;
    var server = gServers.gameServers[sid];
    if (!server || !server.isValid()) {
        resp.code = 1; resp.desc = 'invalid server';
        callback(); return;
    }

    var url = util.format('http://%s:%d?act=online', server.hostIP, server.gatewayPort);
    common.httpGet(url, function(data) {
        resp.data = data;
        callback();
    }, false);
}
